
const command = require('./command')
const ejsRender = require('./generate')
const npmlog = require('npmlog')
/**
 * 打印日志用的插件
 * @type {string}
 */
npmlog.heading = 'light-send'
npmlog.headingStyle = { fg: 'green', bg: 'black' }
async function createProject() {
  try {
    const options = await command()
    await ejsRender(options)
    npmlog.notice('项目已生成完毕')
  }catch (e) {
    npmlog.error(e.message)
  }
  process.exit()
}
createProject()
